<!DOCTYPE html>
<html lang="en"> 
<head>
<meta charset="utf-8" />
<!-- <script src="https://cdn.bootcss.com/jquery-validate/1.15.0/messages_zh.js"></script>
<script src="https://cdn.bootcss.com/jquery-validate/1.15.0/jquery.validate.js"></script>
<script src="https://cdn.bootcss.com/jquery-validate/1.15.0/additional-methods.js"></script> -->
<script>
/* $(function() {
	$.validator.setDefaults({
		submitHandler : function(form) {
			alert("提交事件!");
			form.submit();
		}
	});

	$("#loginform").validate(
			{
				//debug : true, //调试模式，即使验证成功也不会跳转到目标页面
				rules : { //配置验证规则，key就是被验证的dom对象，value就是调用验证的方法(也是json格式)
					userName : {
						required : true, //必填。如果验证方法不需要参数，则配置为true
						rangelength : [ 6, 12 ],
						 remote:{
                            url:"validateUsername.do",
                            type:"post"
                       
					},
					password : {
						required : true,
						rangelength : [ 6, 20 ]
					},
				},
				messages : {
					userName : {
						required : "请输入用户名",
						rangelength : $.validator.format("请输入长度在 {0} 到 {1} 之间的字符串"),
						 remote:"该用户名已存在！" 
					},
					password : {
						required : "请输入密码",
						rangelength : $.validator.format("请输入长度在 {0} 到 {1} 之间的字符串")
					},
				}
			});
}); */
</script>
<!-- <style type="text/css">
body {
	margin: 0px;
	background: url(../image/background/index.jpg) no-repeat;
	background-size: 100% 100%;
	background-attachment: fixed;
	/* background: #DCDDDF url(http://cssdeck.com/uploads/media/items/7/7AF2Qzt.png);
	color: #000;
	font: 14px Arial;
	margin: 0 auto;
	padding: 0;
	position: relative;  */
}
</style>  -->
<title>Paper Stack</title>
<link rel="stylesheet" type="text/css" href="style/css/login.css" />
</head>
<body>
<div class="container">
	<section id="content">
		<form id="loginform" action="login.do" method = "post">
			<h1>Login To Team</h1>
			<div>
				<input type="text" placeholder="请输入用户名" required="用户名不能为空" name="userName"  id="userame" />
			</div>
			<div>
				<input type="password" placeholder="请输入密码" required="密码不能为空"  name="password"  id="passord" />
			</div>
			<div>
				<input type="submit" value="Login" />
				<a href="#">Lost your password?</a>
				<a href="register.html">Register</a>
			</div>
		</form><!-- form -->
		<div class="button">
			<a href="#">welcome!</a>
		</div><!-- button -->
	</section><!-- content -->
</div><!-- container -->
</body>
</html>